//
//  THFlipImageView.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface THFlipImageView : UIView

/**
 翻转转方向 默认为UIViewAnimationOptionTransitionFlipFromLeft
 */
@property (nonatomic) UIViewAnimationOptions flipDirection;
/**
 翻转时间 默认为0.66
 */
@property (nonatomic) NSTimeInterval flipDuration;
/**
 动画间隔时间 默认为1.77
 */
@property (nonatomic) NSTimeInterval flipInterval;

/**
 动画重复次数 默认为0，不限次数
 */
@property (nonatomic) NSInteger repeatCount;

/**
  点击标签回调
 */
@property (nonatomic, copy) void (^didClickBlock)(void);

/**
 点击区域大小 默认比size宽高多10
 */
@property (nonatomic) CGSize touchSize;

- (instancetype)initWithFromImage:(UIImage *)fromImage toImage:(UIImage *)toImage size:(CGSize)size;

- (instancetype)initWithFromView:(UIView *)fromView toView:(UIView *)toView size:(CGSize)size;

- (void)addTarget:(id)target selector:(SEL)selector;

- (void)startAnimation;

- (void)stopAnimation;

@end

NS_ASSUME_NONNULL_END
